﻿//-----------------------------------------------------------------------------
// <copyright file="IElementLifetime.cs" company="William E. Kempf">
//     Copyright (c) William E. Kempf.
// </copyright>
//-----------------------------------------------------------------------------

namespace Onyx.Windows
{
    using System;
    using System.Windows;

    /// <summary>
    /// Defines an object that has lifetime management tracking features.
    /// </summary>
    public interface IElementLifetime
    {
#if WPF
        /// <summary>
        /// Occurs when the <em>view element</em> is initialized.
        /// </summary>
        event EventHandler Initialized;
#endif

        /// <summary>
        /// Occurs when the <em>view element</em> is loaded.
        /// </summary>
        event RoutedEventHandler Loaded;

#if WPF
        /// <summary>
        /// Occurs when the <em>view element</em> is unloaded.
        /// </summary>
        event RoutedEventHandler Unloaded;
#endif
    }
}
